package edu.ccut.titan.tag.report.chart;

import net.sf.jasperreports.engine.JRChartDataset;
import edu.ccut.titan.tag.report.chart.dataset.ITitanDataset;
import edu.ccut.titan.tag.report.chart.dataset.TitanDatasetFactroy;
import edu.ccut.titan.tag.report.design.ChartsInfo;

public class TitanChartDataset implements ITitanChartDataset {

	public JRChartDataset getDataset(ChartsInfo chart) {
		IType type = new Type();
		TitanDatasetFactroy chartDatasetFactroy = new TitanDatasetFactroy();
		ITitanDataset dataset = chartDatasetFactroy.getDataset(type
				.getDatasetType(chart.getType()));
		return dataset.getDatasetContent(chart);
	}
}
